BlueCielo Meridian Global Collaboration Framework 2012 SP1 Administrator's Guide | BlueCielo ECM Solutions

You are here: About the advanced features > VBScript examples > Centralizing sequence number generation > Calculating document names

Calculating document names

To include sequence numbers in document names, a document naming function must be created in VBScript that can be called from remote vaults when new documents are created. This function must receive all the information it needs to know about the new documents as parameters.

Note    The Document object cannot be used in this function because the document being created could be in a remote vault and will not be available as the selected document in the vault where the name is generated.

The following function implements the naming scheme described in Centralizing sequence number generation":

Function NextDocumentName (DocType)
  Select Case DocType
    Case "Generic Document"
      NextDocumentName = "GEN-" & Right ("00000" & Vault.Sequence ("Generic").Next, 5)
    Case Else
      NextDocumentName = "OTH-" & Right ("00000" & Vault.Sequence ("Other").Next, 5)
  End Select
End Function

This function accepts the display name of a document type as a parameter, generates the document name, and returns it to the caller.

This function needs to be implemented only in the central vault where the number sequences will be centralized. The function is called from the remote vaults as described in Requesting a document name.

For information on modifying this procedure for when the central vault is not available, see Handling central vault unavailability.

Related concepts

Centralizing sequence number generation

Understanding table data replication

Related tasks

Transferring ownership upon release

Calculating import notification messages

UpdateTable example

Executing remote script functions

Requesting a document name

Handling central vault unavailability

Enlisting all sites for new documents

Customizing site delistment


Copyright © 2000-2012 BlueCielo ECM Solutions

www.bluecieloecm.com